package com.huluobo.mvidemo.news

import com.huluobo.lib_http.HttpType
import com.huluobo.lib_http.NetworkFactory
import com.huluobo.mvidemo.entity.Res
import kotlinx.coroutines.flow.Flow
import okhttp3.RequestBody
import javax.inject.Inject

/**
 *  Created by LC on 2025/1/13.
 */
class NewsRepo @Inject constructor() {
    val apiService by lazy { NetworkFactory.factory(HttpType.NONE).create(ApiService::class.java) }

    fun getNews(body: RequestBody): Flow<Res> {
        return apiService.getNews(body)
    }
}